// 1.医院列表的数据类型

import { Children } from "react";

// searchParams对象的类型
export interface hospitalListsearchParamsType {
  hosname?: string;
  hoscode?: string;
  hostype?: string;
  provinceCode?: string;
  cityCode?: string;
  districtCode?: string;
  status?: 0 | 1;
}

// bookingRule的数据类型
export interface bookingRuleType {
  cycle: number;
  releaseTime: string;
  stopTime: string;
  quitDay: number;
  quitTime: string;
  rule: string[];
}

export interface hosListItemType {
  id: string;
  createTime: string;
  updateTime: string;
  isDeleted: number;
  param: {
    hostypeString: string;
    fullAddress: string;
  };
  hoscode: string;
  hosname: string;
  hostype: string;
  provinceCode: string;
  cityCode: string;
  districtCode: string;
  address: string;
  logoData: string;
  intro: string;
  route: string;
  status: 0 | 1;
  bookingRule: bookingRuleType | null;
}

export type hospitalListContentType = hosListItemType[];

// 请求医院列表的返回值类型?
export interface hospitalListReqReturnType {
  content: hospitalListContentType;
  pageable: {
    sort: {
      sorted: boolean;
      unsorted: boolean;
      empty: boolean;
    };
    pageNumber: number;
    pageSize: number;
    offset: number;
    paged: boolean;
    unpaged: boolean;
  };
  totalElements: number;
  totalPages: number;
  last: boolean;
  first: boolean;
  sort: {
    sorted: boolean;
    unsorted: boolean;
    empty: boolean;
  };
  numberOfElements: number;
  size: number;
  number: number;
  empty: boolean;
}

// 2.请求三级联动每一个的数据类型
export interface getProvinceItemRequestType {
  id: number;
  createTime: string;
  updateTime: string;
  isDeleted: number;
  param: {};
  parentId: number;
  name: string;
  value: string;
  dictCode: null;
  hasChildren: boolean;
}

// 三级联动的所有数据
export type getProvinceReturnRequestType = getProvinceItemRequestType[];

// 3.医院详情的返回值的所有数据
export interface hosListDetailType {
  bookingRule?: bookingRuleType;
  hospital?: hosListItemType;
}

//  4.医院科室的请求返回值的每一项的类型
export interface DepartmentListReturnItemType {
  depcode: string;
  depname: string;
  children: [
    {
      depcode: string;
      depname: string;
      children: null;
    }
  ];
}

// 医院科室请求的返回值的类型
export type DepartmentListReturnType = DepartmentListReturnItemType[];

// 医院排班管理的参数类型
export interface HoslistScheduleType {
  page: number;
  limit: number;
  hoscode: string;
  depcode: string;
}

// bookingScheduleList的类型
export interface bookingScheduleListType {
  workDate: string;
  workDateMd: null;
  dayOfWeek: string;
  docCount: number;
  reservedNumber: number;
  availableNumber: number;
  status: null;
}

// 医院排班返回值的类型
export interface scheduleRuleReturnType {
  total: number;
  bookingScheduleList: bookingScheduleListType[];
  baseMap: {
    hosname: string;
  };
}

// 医师排班情况请求的参数类型
export interface findeScheduleType {
  hoscode: string;
  depcode: string;
  workDate: string;
}

// 医师排班情况的返回值的类型
export interface findeScheduleReturnItemType {
  id: string;
  createTime: string;
  updateTime: string;
  isDeleted: number;
  param: {
    dayOfWeek: string;
    depname: string;
    hosname: string;
  };
  hoscode: string;
  depcode: string;
  title: string;
  docname:string;
  skill: string;
  workDate: string;
  workTime: number;
  reservedNumber: number;
  availableNumber: number;
  amount: number;
  status: number;
  hosScheduleId: string;
}
export type  findeScheduleReturnType =  findeScheduleReturnItemType[]
